package com.yanze.schoolinformation.model.bean;

import android.os.Parcel;
import android.os.Parcelable;
import android.view.View;

/**
 * Created by MrZheng on 2018/3/23.
 */

public class HomeMenuBean implements Parcelable {
    String title;
    String link;
    String imgId;
    View.OnClickListener listener;

    protected HomeMenuBean(Parcel in) {
        title = in.readString();
        link = in.readString();
        imgId = in.readString();
    }

    public static final Creator<HomeMenuBean> CREATOR = new Creator<HomeMenuBean>() {
        @Override
        public HomeMenuBean createFromParcel(Parcel in) {
            return new HomeMenuBean(in);
        }

        @Override
        public HomeMenuBean[] newArray(int size) {
            return new HomeMenuBean[size];
        }
    };

    public View.OnClickListener getListener() {
        return listener;
    }

    public void setListener(View.OnClickListener listener) {
        this.listener = listener;
    }

    public HomeMenuBean(String title, String link) {
        this.title = title;
        this.link = link;
    }

    public HomeMenuBean(String title, String link, String imgId) {
        this.title = title;
        this.link = link;
        this.imgId = imgId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getImgId() {
        return imgId;
    }

    public void setImgId(String imgId) {
        this.imgId = imgId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(title);
        parcel.writeString(link);
        parcel.writeString(imgId);
    }
}
